package me.sdevil507.biz.common.log.po;

import lombok.Data;
import lombok.EqualsAndHashCode;
import me.sdevil507.supports.jpa.BaseJpaSnowflakeIdEntity;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @program: tips_back_end
 * @description: 日志
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "biz_log")
@Where(clause="is_del = 0")
public class LogPO extends BaseJpaSnowflakeIdEntity {

    /**
     * 日志来源终端
     */
    @Column
    private String logSource;

    /**
     * 日志类型
     */
    @Column
    private String logType;

    /**
     * 操作数据主键
     */
    @Column
    private long dataId;

    /**
     * 操作数据备注
     */
    @Column
    private String dataName;

    /**
     * 日志操作内容
     */
    @Column
    private String logOperate;

    /**
     * 日志操作者id
     */
    @Column
    private long userId;

    /**
     * 日志操作者姓名
     */
    @Column
    private String userName;

    /**
     * 是否删除
     */
    @Column(nullable = false)
    private Boolean  isDel= false;

    /**
     * 创建时间
     */
    @Column
    private Date createTime = new Date();

    /**
     * 更新时间
     */
    @Column
    private Date updateTime = new Date();
}
